package com.wash.shoes.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author ljg
 * @since 2024-09-12
 */
@ApiModel(value = "美团授权的回调")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("os_mt_auth")
public class MtAuthPo extends Model<MtAuthPo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "门店的id")
    private String id;

    @ApiModelProperty(value = "授权码，有效期为10分钟")
    private String code;

    @ApiModelProperty(value = "请求的数字签名")
    private String sign;

    @ApiModelProperty(value = "developerId,用户id")
    private String developerId;

    @ApiModelProperty(value = "业务类型id")
    private String businessId;

    @ApiModelProperty(value = "每美团返回的json")
    private String mtResponse;

    @ApiModelProperty(value = "返回的code")
    private String mtCode;

    @ApiModelProperty(value = "返回的Msg")
    private String mtMsg;

    @ApiModelProperty(value = "访问令牌")
    private String accessToken;

    @ApiModelProperty(value = "access_token有效时间")
    private String expireIn;

    @ApiModelProperty(value = "更新令牌")
    private String refreshToken;

    @ApiModelProperty(value = "业务授权时传的scope，不传默认为：all")
    private String scope;

    @ApiModelProperty(value = "授权实体的唯一标识")
    private String opBizCode;

    @ApiModelProperty(value = "授权实体名称（如果授权实体是门店则为门店名）")
    private String opBizName;

    @ApiModelProperty(value = "状态0删除  1上架  2下架  ")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "扩展字段")
    private String extendInfo;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建者")
    private String createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}
